/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package 解析.node.charproperty;

import java.lang.reflect.Field;
import java.util.logging.Level;
import java.util.logging.Logger; 
import static 解析.Pattern.inRange;
import 解析.node.node.BackRef;
import 解析.node.node.Start; 

/**
 *
 * @author yanxi
 */
public class InsensitiveRangeUnicodeCP extends CharProperty{
    public int lower;
    public int upper;
    public InsensitiveRangeUnicodeCP(int lower, int upper){
        this.lower=lower; 
        this.upper=upper; 
    } 
    @Override
    public boolean isSatisfiedBy (int ch) {
        if (inRange(lower, ch, upper)) {
            return true;
        }
        int up = Character.toUpperCase(ch);
        return inRange(lower, up, upper) || inRange(lower, Character.toLowerCase(up), upper);
    }
    
 
    @Override
    public String toString(){
        return "["+this.getClass().getName()+"]"+"lower:"+lower+",upper:"+upper;
    }
}
